<template>
  <div class="huainavall">
      <ul class="huatinav">
          <li  v-for="(v,i) in arr" :key="i" @click="fun(v.path)">{{v.con}}</li>
      </ul>
  </div>
</template>

<script>
export default {
    data(){
        return{
            arr:[
                {con:"推荐",path:"/tuijian"},
                {con:"新时代",path:"/xinshidai"},
                {con:"视频",path:"/shipin"},
                {con:"热点",path:"/redian"},
                {con:"军事",path:"/junshi"},
                {con:"娱乐",path:"/yule"},
                {con:"历史",path:"/lishi"},
                {con:"体育",path:"/tiyu"},
            ]
        }
    },
    methods:{
        fun(path){
            this.$router.push(path)
        }
    }
}
</script>

<style scoped>
.huainavall{
    box-sizing: border-box;
    padding: 0.1rem;
    position: sticky;
    top: 0.4rem;
    z-index: 11;
    background-color: rgba(255, 255, 255,0.9);
}
.huatinav{
    width: 100%;
    height: 0.3rem;
    display: flex;
    /* justify-content: space-evenly; */
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    
}
.huatinav li{
    width: 0.5rem;
    flex-shrink: 0;
}
.huatinav li:hover{
    color: orangered;
}
</style>